//
//  PlayManager.h
//  MusicDemo
//
//  Created by lanou on 16/6/16.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@protocol PlayManagerDelegatee <NSObject>
//把播放信息传给播放页面
- (void)playManagerDelegateFetchTotalTime:(NSString *)totalTime currentTime:(NSString *)currentTime progress:(CGFloat)progress;
//自动播放到下一首
- (void)playToNextMusic;

@end



@interface PlayManager : NSObject

@property (nonatomic,weak)id<PlayManagerDelegatee> delegate;






//单例类创建
+ (instancetype)creatPlayManager;
//暂停
- (void)pauseMusic;
//播放
- (void)playMusic;
//准备去播放
- (void)prepareToPlayMusicWithUrl:(NSString *)url;
//快进快退
- (void)playMusicWithSliderValue:(CGFloat)progress;
//是否正在播放
- (BOOL)isPlaying;

@end
